package com.yuan.dto;

import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotNull;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class StudentDTO {


    @NotNull(message = "id不能为空!!!")
    private Integer stuId;
    @Length(min = 3, max = 6, message = "长度在3-6之间!!!")
    private String stuName;
    @Min(value = 18, message = "年龄最小18岁!!!")
    @Max(value = 120,message = "年龄最大120岁!!!")
    private Integer stuAge;
    @Email(message = "邮箱格式不正确!!!")
    private String stuEmail;

}
